<template>


  <div id="myChart" :style="{ width: '800px', height: '500px' }"></div>

</template>

<script>
export default {
  name: "Pc2FbEcharts",

  data() {
    return {};
  },

  mounted() {
    this.drawLine();
  },

  methods: {
    drawLine() {
      // 基于准备好的dom，初始化echarts实例
      let myChart = this.$echarts.init(document.getElementById("myChart"));
      // 绘制图表
      myChart.setOption({
        //           title: {
        //              text: 'Referer of a Website',
        //              subtext: 'Fake Data',
        //              left: 'center'
        // },
        // tooltip: {
        //   trigger: 'item'
        // },
        // legend: {
        //   top: '5%',
        //   left: 'center'
        // },
        series: [
          {
            // name: 'Access From',
            type: 'pie',
            radius: ['40%', '20%'],
            avoidLabelOverlap: false,
            label: {
              show: true,
              position: 'center'
            },
            emphasis: {
              label: {
                show: true,
                fontSize: 40,
                fontWeight: 'bold'
              }
            },
            labelLine: {
              show: false
            },
            data: [
              { value: 74, name: '实收 74%' },
              { value: 26 },
            ]
          }
        ]
      });
    },
  },
};
</script>
